import {getTokey} from "@/utils/token";
import {Navigate} from "react-router-dom";

const AuthRouter=({children})=>{
    const isTokey = getTokey()
    if (isTokey){
        return <>{children}</>
    }else {
        return <Navigate to='/login' replace></Navigate>
    }
}

export default AuthRouter